<script setup lang="ts">
defineProps<{
  streamUrl: string
  title: string
  viewerCount: number
}>()
</script>

<template>
  <div class="live-player">
    <div class="video-container">
      <!-- 实际项目中这里可以替换为真实的播放器组件 -->
      <div class="video-placeholder">
        <span>直播画面</span>
      </div>
    </div>
    <div class="stream-info">
      <h2>{{ title }}</h2>
      <div class="viewer-count">
        <span>{{ viewerCount }}</span> 观看
      </div>
    </div>
  </div>
</template>

<style scoped>
.live-player {
  width: 100%;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 1.2em;
}

.stream-info {
  padding: 1rem;
}

.stream-info h2 {
  margin: 0;
  font-size: 1.2em;
  color: #fff;
}

.viewer-count {
  margin-top: 0.5rem;
  color: #888;
  font-size: 0.9em;
}
</style>